/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Admin_AddItem.java
 *
 * Created on Mar 30, 2011, 11:02:16 AM
 */
package admin_gui;

import DTO.Category;
import DTO.Item;
import admin.BusinessLogic.Validation;
import admin.Controller.ItemController;

import java.io.*;
import java.util.ArrayList;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author edaype
 */
public class Admin_AddItem extends javax.swing.JPanel {

    private ItemController itemController;
    private JPanel mainPanel;
    private JFileChooser fc;
    private Validation validation;
    //   String newline;

    /** Creates new form Admin_AddItem */
    public Admin_AddItem() {
        initComponents();
        fc = new JFileChooser();
        itemController = new ItemController(mainPanel);
        ArrayList<Category> list = itemController.getCategories();
        DefaultMutableTreeNode root = processTree(list, list.get(0));
        CategoryTree = new JTree(root);
        CategoryPane.setViewportView(CategoryTree);
        validation = new Validation();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        NameLabel = new javax.swing.JLabel();
        UPCLabel = new javax.swing.JLabel();
        MakeLabel = new javax.swing.JLabel();
        ModelLabel = new javax.swing.JLabel();
        ModelField = new javax.swing.JTextField();
        MakeField = new javax.swing.JTextField();
        UPCField = new javax.swing.JTextField();
        NameField = new javax.swing.JTextField();
        DescriptionLabel = new javax.swing.JLabel();
        LabelPanel1 = new javax.swing.JPanel();
        PriceLabel = new javax.swing.JLabel();
        RetailLabel = new javax.swing.JLabel();
        PriceField = new javax.swing.JTextField();
        RetailField = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        URLField = new javax.swing.JTextField();
        broswer = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        CategoryPane = new javax.swing.JScrollPane();
        CategoryTree = new javax.swing.JTree();
        DescriptionPane = new javax.swing.JScrollPane();
        DescriptionField = new javax.swing.JTextArea();
        jLabel3 = new javax.swing.JLabel();
        ButtonLayout = new javax.swing.JPanel();
        AddButton = new javax.swing.JButton();
        ResetButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 255));

        jPanel1.setBackground(java.awt.Color.white);

        NameLabel.setFont(new java.awt.Font("Tahoma", 0, 24));
        NameLabel.setText("Name");

        UPCLabel.setFont(new java.awt.Font("Tahoma", 0, 24));
        UPCLabel.setText("UPC");

        MakeLabel.setFont(new java.awt.Font("Tahoma", 0, 24));
        MakeLabel.setText("Make");

        ModelLabel.setFont(new java.awt.Font("Tahoma", 0, 24));
        ModelLabel.setText("Model");

        ModelField.setFont(new java.awt.Font("Tahoma", 0, 24));

        MakeField.setFont(new java.awt.Font("Tahoma", 0, 24));

        UPCField.setFont(new java.awt.Font("Tahoma", 0, 24));

        NameField.setFont(new java.awt.Font("Tahoma", 0, 24));

        DescriptionLabel.setFont(new java.awt.Font("Tahoma", 0, 24));
        DescriptionLabel.setText("Description");

        LabelPanel1.setBackground(java.awt.Color.white);

        PriceLabel.setFont(new java.awt.Font("Tahoma", 0, 24));
        PriceLabel.setText("Cost Price");

        RetailLabel.setFont(new java.awt.Font("Tahoma", 0, 24));
        RetailLabel.setText("Retail Price");

        PriceField.setFont(new java.awt.Font("Tahoma", 0, 24));

        RetailField.setFont(new java.awt.Font("Tahoma", 0, 24));

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 24));
        jLabel2.setText("URL");

        URLField.setFont(new java.awt.Font("Tahoma", 0, 14));

        broswer.setText("...");
        broswer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                broswerActionPerformed(evt);
            }
        });

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 24));
        jLabel4.setText("Category");

        CategoryPane.setViewportView(CategoryTree);

        javax.swing.GroupLayout LabelPanel1Layout = new javax.swing.GroupLayout(LabelPanel1);
        LabelPanel1.setLayout(LabelPanel1Layout);
        LabelPanel1Layout.setHorizontalGroup(
            LabelPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LabelPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(LabelPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(LabelPanel1Layout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addComponent(jLabel4)
                        .addGap(18, 18, 18)
                        .addComponent(CategoryPane, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE))
                    .addGroup(LabelPanel1Layout.createSequentialGroup()
                        .addGroup(LabelPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(PriceLabel)
                            .addComponent(RetailLabel)
                            .addComponent(jLabel2))
                        .addGap(18, 18, 18)
                        .addGroup(LabelPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, LabelPanel1Layout.createSequentialGroup()
                                .addComponent(URLField, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(broswer, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(RetailField, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)
                            .addComponent(PriceField, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE))))
                .addContainerGap())
        );
        LabelPanel1Layout.setVerticalGroup(
            LabelPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LabelPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(LabelPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(PriceLabel)
                    .addComponent(PriceField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(38, 38, 38)
                .addGroup(LabelPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RetailLabel)
                    .addComponent(RetailField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(36, 36, 36)
                .addGroup(LabelPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(URLField, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(broswer)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(40, 40, 40)
                .addGroup(LabelPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(LabelPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addComponent(CategoryPane, javax.swing.GroupLayout.DEFAULT_SIZE, 248, Short.MAX_VALUE)))
        );

        DescriptionField.setColumns(20);
        DescriptionField.setRows(5);
        DescriptionPane.setViewportView(DescriptionField);

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 24));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(DescriptionPane, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(UPCLabel)
                                    .addComponent(NameLabel))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(UPCField, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)
                                    .addComponent(NameField, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addComponent(MakeLabel)
                                .addGap(18, 18, 18)
                                .addComponent(MakeField, javax.swing.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(ModelLabel)
                                .addGap(18, 18, 18)
                                .addComponent(ModelField, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(DescriptionLabel))
                        .addGap(20, 20, 20)
                        .addComponent(LabelPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(92, 92, 92)
                        .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 574, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UPCLabel)
                            .addComponent(UPCField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(37, 37, 37)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(NameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(NameLabel))
                        .addGap(39, 39, 39)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(MakeLabel)
                            .addComponent(MakeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(33, 33, 33)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ModelField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ModelLabel))
                        .addGap(33, 33, 33)
                        .addComponent(DescriptionLabel)
                        .addGap(18, 18, 18)
                        .addComponent(DescriptionPane, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(LabelPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        ButtonLayout.setBackground(new java.awt.Color(255, 255, 255));

        AddButton.setFont(new java.awt.Font("Tahoma", 0, 18));
        AddButton.setText("Add");
        AddButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AddButtonActionPerformed(evt);
            }
        });

        ResetButton.setFont(new java.awt.Font("Tahoma", 0, 18));
        ResetButton.setText("Reset");
        ResetButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ResetButtonActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Copperplate Gothic Bold", 2, 60));
        jLabel1.setText("Add Item");

        javax.swing.GroupLayout ButtonLayoutLayout = new javax.swing.GroupLayout(ButtonLayout);
        ButtonLayout.setLayout(ButtonLayoutLayout);
        ButtonLayoutLayout.setHorizontalGroup(
            ButtonLayoutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ButtonLayoutLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 87, Short.MAX_VALUE)
                .addComponent(ResetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(52, 52, 52)
                .addComponent(AddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        ButtonLayoutLayout.setVerticalGroup(
            ButtonLayoutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ButtonLayoutLayout.createSequentialGroup()
                .addGroup(ButtonLayoutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(ButtonLayoutLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(ButtonLayoutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(AddButton, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ResetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(ButtonLayout, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(15, Short.MAX_VALUE)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(ButtonLayout, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void ResetButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ResetButtonActionPerformed
        // TODO add your handling code here:
        MakeField.setText("");
        ModelField.setText("");
        URLField.setText("");
        NameField.setText("");
        PriceField.setText("");
        RetailField.setText("");
        UPCField.setText("");
        DescriptionField.setText("");
    }//GEN-LAST:event_ResetButtonActionPerformed

    private void AddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AddButtonActionPerformed
        // TODO add your handling code here:
        int ctid = -1;
        String make = MakeField.getText();
        String model = ModelField.getText();
        String URL = URLField.getText();
        String name = NameField.getText();
        String price = PriceField.getText();
        String retail = RetailField.getText();
        String UPC = UPCField.getText();
        String description = DescriptionField.getText();
        DefaultMutableTreeNode selectedNode =
                (DefaultMutableTreeNode) CategoryTree.getLastSelectedPathComponent();
        if (make.equals("") || model.equals("") || URL.equals("") || name.equals(
                "") || price.equals("") || retail.equals("") || UPC.equals("")) {
            JOptionPane.showMessageDialog(null, "Please input all information",
                    "Error", JOptionPane.ERROR_MESSAGE);
        } else if (UPC.length() > 12) {
            JOptionPane.showMessageDialog(null, "Invalid UPC code",
                    "Error", JOptionPane.ERROR_MESSAGE);
        } else if ((!validation.ValidateFloat(retail)) || (!validation.ValidateFloat(
                price))) {
            JOptionPane.showMessageDialog(null, "The price has to be numberic",
                    "Error", JOptionPane.ERROR_MESSAGE);
        } else if (selectedNode == null) {
            JOptionPane.showMessageDialog(null, "Please choose one categary",
                    "Error", JOptionPane.ERROR_MESSAGE);
        } else {
            Category selectedCategory = (Category) selectedNode.getUserObject();
            if (selectedCategory.getCtid() != 0) {
                DefaultMutableTreeNode parentNode =
                        (DefaultMutableTreeNode) selectedNode.getParent();
                Category parentCategory = (Category) parentNode.getUserObject();
                ctid = selectedCategory.getCtid();
            }
            Item i = new Item();
            i.setUPC(UPC);
            i.setCostPrice(Double.parseDouble(price));
            i.setName(name);
            i.setRetailPrice(Double.parseDouble(retail));
            i.setDescription(description);
            i.setMake(make);
            i.setModel(model);
            i.setImgURL(URL);
            i.setCategoryID(ctid);
            boolean b = false;
            b = itemController.addItem(i);
            if (b) {
                jLabel3.setText("Item " + UPC +
                        " has been registered successfully!");
                MakeField.setText("");
                ModelField.setText("");
                URLField.setText("");
                NameField.setText("");
                PriceField.setText("");
                RetailField.setText("");
                UPCField.setText("");
                DescriptionField.setText("");
            }
        }
    }//GEN-LAST:event_AddButtonActionPerformed

    private void broswerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_broswerActionPerformed

        int returnVal = fc.showOpenDialog(null);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File file = fc.getSelectedFile();
            URLField.setText(file.getName());
        }
    }//GEN-LAST:event_broswerActionPerformed
    private DefaultMutableTreeNode processTree(ArrayList<Category> list,
            Category rootNode) {
        DefaultMutableTreeNode node = new DefaultMutableTreeNode(rootNode);
        DefaultMutableTreeNode child;
  //      System.out.println("list: " + list.size());
        for (int i = 0; i < list.size(); i++) {
            Category nodeSpecifier = list.get(i);
            //    System.out.println(i);
            if (nodeSpecifier.getPctid() == rootNode.getCtid()) {
                //        System.out.println(i);
                child = processTree(list, nodeSpecifier);
                node.add(child);
            }
        }
        return node;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton AddButton;
    private javax.swing.JPanel ButtonLayout;
    private javax.swing.JScrollPane CategoryPane;
    private javax.swing.JTree CategoryTree;
    private javax.swing.JTextArea DescriptionField;
    private javax.swing.JLabel DescriptionLabel;
    private javax.swing.JScrollPane DescriptionPane;
    private javax.swing.JPanel LabelPanel1;
    private javax.swing.JTextField MakeField;
    private javax.swing.JLabel MakeLabel;
    private javax.swing.JTextField ModelField;
    private javax.swing.JLabel ModelLabel;
    private javax.swing.JTextField NameField;
    private javax.swing.JLabel NameLabel;
    private javax.swing.JTextField PriceField;
    private javax.swing.JLabel PriceLabel;
    private javax.swing.JButton ResetButton;
    private javax.swing.JTextField RetailField;
    private javax.swing.JLabel RetailLabel;
    private javax.swing.JTextField UPCField;
    private javax.swing.JLabel UPCLabel;
    private javax.swing.JTextField URLField;
    private javax.swing.JButton broswer;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
}
